#include <assert.h>
#include "KOperation.h"
#include <iostream>

using namespace std;
using namespace KSudoku;

#ifdef _DEBUG
void KOperation::AssertValid(const KOperation* pkObj) const
{
	assert(pkObj);
	assert(m_nValue >= 0);
	assert(m_nX >= 0);
	assert(m_nY >= 0);
}
#endif // #ifdef _DEBUG

KOperation::KOperation(void)
{
	m_nY = 0;
	m_nX = 0;
	m_nValue = 0;
}

KOperation::KOperation(int nY, int nX, int nValue)
{
	m_nY = nY;
	m_nX = nX;
	m_nValue = nValue;
}

KOperation::KOperation(const KOperation* pkOther)
{
	m_nY = pkOther->m_nY;
	m_nX = pkOther->m_nX;
	m_nValue = pkOther->m_nValue;
}

KOperation::KOperation(const KOperation& kOther)
{
	m_nY = kOther.m_nY;
	m_nX = kOther.m_nX;
	m_nValue = kOther.m_nValue;
}

KOperation::~KOperation(void)
{
}

const KOperation& KOperation::operator=(const KOperation& kOther)
{
	if (this == &kOther)
	{
		return *this;
	}
	m_nY = kOther.m_nY;
	m_nX = kOther.m_nX;
	m_nValue = kOther.m_nValue;
	return *this;
}

int KOperation::GetY(void)
{
	ASSERT_VALID(this);
	return m_nY;
}

int KOperation::GetX(void)
{
	ASSERT_VALID(this);
	return m_nX;
}

int KOperation::GetValue(void)
{
	ASSERT_VALID(this);
	return m_nValue;
}
